﻿using System;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.Xna.Framework.Audio
{
	/// <summary>
	/// The exception that is thrown when Microphone API calls are made on a disconnected microphone.
	/// </summary>
	[Serializable, SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
	public sealed class NoMicrophoneConnectedException : Exception
	{
		/// <summary>
		/// Initializes a new instance of the NoMicrophoneConnectedException class.
		/// </summary>
		public NoMicrophoneConnectedException()
		{
		}

		/// <summary>
		/// Initializes a new instance of the NoMicrophoneConnectedException class with a specified error message.
		/// </summary>
		/// <param name="message">A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</param>
		public NoMicrophoneConnectedException(string message)
			: base(message)
		{
		}

		/// <summary>
		/// Initializes a new instance of the NoMicrophoneConnectedException class with a specified error message and a reference to the inner exception that is the cause of this exception.
		/// </summary>
		/// <param name="message">A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</param>
		/// <param name="inner">Exception that is the cause of the current exception. If innerException is not null, the current exception is raised in a catch block that handles the inner exception.</param>
		public NoMicrophoneConnectedException(string message, Exception inner)
			: base(message, inner)
		{
		}
	}
}
